
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="common/head::head"></head>
<body style="margin-top: 65px;">

<div th:include="common/header::header"></div>

<div class="fly-home fly-panel" style="background-image: url('')">
  <img th:src="@{${userInfo.portrait}}" th:alt="${userInfo.username}">
  <i class="iconfont icon-renzheng" title="社区认证"></i>
  <h1>
    <span th:text="${userInfo.username}"></span>
    <i th:class="${userInfo.sex=='M'?'iconfont icon-nan':'iconfont icon-nv'}"></i>
    <!-- <i class="iconfont icon-nv"></i>  -->
    <!--<i class="layui-badge fly-badge-vip">VIP3</i>-->
    <!--
    <span style="color:#c00;">（管理员）</span>
    <span style="color:#5FB878;">（社区之光）</span>
    <span>（该号已被封）</span>
    -->
  </h1>

  <p style="padding: 10px 0; color: #5FB878;">认证信息：<span th:text="${roleInfo.name}"></span></p>

  <p class="fly-home-info">
    <!--<i class="iconfont icon-kiss" title="飞吻"></i><span style="color: #FF7200;">66666 飞吻</span>-->
    <i class="iconfont icon-shijian"></i><span><span th:text="${#dates.format(userInfo.registerDate, 'yyyy-MM-dd')}"></span> 加入</span>
    <i class="iconfont icon-chengshi"></i><span th:text="${userInfo?.city}"></span>
  </p>

  <p class="fly-home-sign" th:text="${userInfo.signature}"></p>

  <!--<div class="fly-sns" data-user="">-->
    <!--<a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>-->
    <!--<a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>-->
  <!--</div>-->

</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6 fly-home-jie">
      <div class="fly-panel">
        <h3 class="fly-panel-title" th:text="${#strings.append(userInfo.username, ' 最近的发帖')}"></h3>
        <ul class="jie-row" th:if="${currPosts != null}">
          <li th:each="posts:${currPosts}">
            <span class="fly-jing" th:if="${posts.essence}">精</span>
            <a th:href="@{'/jie/detail?id=' + ${posts.id}}" target="_blank" class="jie-title" th:text="${posts.title}"> </a>
            <i th:text="${#dates.format(posts.publishTime, 'yyyy-MM-dd hh:mm:ss')}"></i>
            <em class="layui-hide-xs" th:text="${#strings.append(posts.readCount, '评论')}"></em>
          </li>
        </ul>
        <div th:if="${currPosts == null}" class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><i style="font-size:14px;">主人有点懒，没有发表任何帖子</i></div>
      </div>
    </div>

    <div class="layui-col-md6 fly-home-da">
      <div class="fly-panel">
        <h3 class="fly-panel-title" th:text="${#strings.append(userInfo.username, ' 最近的回复')}"></h3>
        <ul class="home-jieda" th:if="${currReplys != null}">
          <li th:each="rep:${currReplys}">
          <p>
          <span th:text="${#dates.format(rep.createTime, 'yyyy-MM-dd hh:mm:ss')}"></span>
          在<a th:href="@{'/jie/detail?id=' + ${rep.postsId}}" target="_blank" th:text="${rep.postsTitle}"></a>中回复：
          </p>
          <div class="home-dacontent" th:text="${rep.content}">
          </div>
        </li>

        </ul>
        <div th:if="${currReplys == null}" class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"><span>没有回答任何问题</span></div>
      </div>
    </div>
  </div>
</div>

<div th:include="common/footer::footer"></div>

<script th:src="@{/layui/layui.js}"></script>
<script th:inline="javascript">
  layui.cache.page = 'user';
  layui.cache.user = {
      username: [[${user==null?'游客':user.username}]]
      ,id: [[${user==null?-1:user.id}]]
  };
  layui.config({
    version: "3.0.0"
    ,base: '/mods/'
  }).extend({
    fly: 'index'
  }).use('fly', function(){
      var $ = layui.$
          ,fly = layui.fly;
      //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
      $('.home-dacontent').each(function(){
          var othis = $(this), html = othis.html();
          othis.html(fly.content(html));
      });
  });
</script>

</body>
</html>